<template>
    <div class="home-week">
        <div class="week-title">周末去哪玩</div>
        <ul class="week-list">
            <li class="week-list-container border-bottom" v-for= 'item in weekendList' :key= 'item.id'>
                <div class="week-img-container">
                    <img class="week-img" :src= "item.imgUrl">
                </div>
                <div class="week-info">
                    <p class="week-info-title">{{item.title}}</p>
                    <p class="week-info-desc">{{item.desc}}</p>
                </div>
            </li>
        </ul>
    </div>
</template>
<script>
export default {
    name: 'home-week',
    data() {
        return {
        }
    },
    props: {
        weekendList: Array
    }
}
</script>

<style lang= "stylus" scoped>
@import '../../../assets/styles/maxins.styl';
*
    margin 0
    padding 0
    box-sizing border-box
    .week-title
        text-indent .2rem
        background #eee
        line-height .8rem
        font-size .32rem
    .week-img-container
        height 0
        overflow hidden
        padding-bottom 37%
        .week-img
            width 10rem
    .week-info
        padding-bottom .1rem
        overflow hidden
        /* overflow hidden 用来触发ellipsis(),因为没有设置宽度，也可以直接设置宽度*/
        .week-info-title
            line-height .4rem
        .week-info-desc
            line-height .4rem
            color #ccc
            ellipsis()
</style>
